/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit.features.mocking;

import picounit.mocker.Action;
import picounit.mocker.ArrayConsequenceCapturer;
import picounit.mocker.ArrayConsequenceMatcher;
import picounit.mocker.BooleanArrayAction;
import picounit.mocker.BooleanArrayConsequenceCapturer;
import picounit.mocker.BooleanArrayConsequenceMatcher;
import picounit.mocker.ByteArrayAction;
import picounit.mocker.ByteArrayConsequenceCapturer;
import picounit.mocker.ByteArrayConsequenceMatcher;
import picounit.mocker.CharArrayAction;
import picounit.mocker.CharArrayConsequenceCapturer;
import picounit.mocker.CharArrayConsequenceMatcher;
import picounit.mocker.DoubleArrayAction;
import picounit.mocker.DoubleArrayConsequenceCapturer;
import picounit.mocker.DoubleArrayConsequenceMatcher;
import picounit.mocker.FloatArrayAction;
import picounit.mocker.FloatArrayConsequenceCapturer;
import picounit.mocker.FloatArrayConsequenceMatcher;
import picounit.mocker.IntArrayAction;
import picounit.mocker.IntArrayConsequenceCapturer;
import picounit.mocker.IntArrayConsequenceMatcher;
import picounit.mocker.LongArrayAction;
import picounit.mocker.LongArrayConsequenceCapturer;
import picounit.mocker.LongArrayConsequenceMatcher;
import picounit.mocker.OccurencesMatcher;
import picounit.mocker.ShortArrayAction;
import picounit.mocker.ShortArrayConsequenceCapturer;
import picounit.mocker.ShortArrayConsequenceMatcher;
import picounit.mocker.StringArrayAction;
import picounit.mocker.StringArrayConsequenceCapturer;
import picounit.mocker.StringArrayConsequenceMatcher;

@SuppressWarnings("unchecked")
class CombinedArrayConsequenceMatcher extends BaseConsequenceMatcher
	implements BooleanArrayConsequenceMatcher,
	ByteArrayConsequenceMatcher, CharArrayConsequenceMatcher, DoubleArrayConsequenceMatcher,
	FloatArrayConsequenceMatcher, IntArrayConsequenceMatcher, LongArrayConsequenceMatcher,
	ShortArrayConsequenceMatcher, StringArrayConsequenceMatcher, ArrayConsequenceMatcher,
	
	BooleanArrayConsequenceCapturer, ByteArrayConsequenceCapturer, CharArrayConsequenceCapturer,
	DoubleArrayConsequenceCapturer, FloatArrayConsequenceCapturer, IntArrayConsequenceCapturer,
	LongArrayConsequenceCapturer, ShortArrayConsequenceCapturer, StringArrayConsequenceCapturer,
	ArrayConsequenceCapturer {

	public CombinedArrayConsequenceMatcher(ActiveRecordingPlaybackMock activeRecordingPlaybackMock,
		OccurencesMatcher occurencesMatcher, MockInvocationInspector mockInvocationInspector) {
		
		super(activeRecordingPlaybackMock, occurencesMatcher, mockInvocationInspector);
	}

	///////////////////////////////////////////////////////////////////////////////////////////////
	// <Type>ConsequenceMatcher andReturn - single
	///////////////////////////////////////////////////////////////////////////////////////////////

	///////////////////////////////////////////////////////////////////////////////////////////////
	// andReturn - multiple
	///////////////////////////////////////////////////////////////////////////////////////////////

	public OccurencesMatcher andReturn(boolean ... results) {
		return will(returnValue(results));
	}
	
	public OccurencesMatcher andReturn(byte ... results) {
		return will(returnValue(results));
	}
	
	public OccurencesMatcher andReturn(char ... results) {
		return will(returnValue(results));
	}
	
	public OccurencesMatcher andReturn(double ... results) {
		return will(returnValue(results));
	}
	
	public OccurencesMatcher andReturn(float ... results) {
		return will(returnValue(results));
	}
	
	public OccurencesMatcher andReturn(int ... results) {
		return will(returnValue(results));
	}
	
	public OccurencesMatcher andReturn(long ... results) {
		return will(returnValue(results));
	}
	
	public OccurencesMatcher andReturn(short ... results) {
		return will(returnValue(results));
	}

	public OccurencesMatcher andReturn(String ... results) {
		return will(returnValue(results));
	}

	public OccurencesMatcher andReturn(Object ... results) {
		return will(returnValue(results));
	}

	public OccurencesMatcher andPerform(BooleanArrayAction booleanAction) {
		return will(new BooleanArrayActionStub(booleanAction));
	}

	public OccurencesMatcher andPerform(ByteArrayAction byteAction) {
		return will(new ByteArrayActionStub(byteAction));
	}

	public OccurencesMatcher andPerform(CharArrayAction charAction) {
		return will(new CharArrayActionStub(charAction));
	}

	public OccurencesMatcher andPerform(DoubleArrayAction doubleAction) {
		return will(new DoubleArrayActionStub(doubleAction));
	}

	public OccurencesMatcher andPerform(FloatArrayAction floatAction) {
		return will(new FloatArrayActionStub(floatAction));
	}

	public OccurencesMatcher andPerform(IntArrayAction intAction) {
		return will(new IntArrayActionStub(intAction));
	}

	public OccurencesMatcher andPerform(LongArrayAction longAction) {
		return will(new LongArrayActionStub(longAction));
	}

	public OccurencesMatcher andPerform(ShortArrayAction shortAction) {
		return will(new ShortArrayActionStub(shortAction));
	}

	public OccurencesMatcher andPerform(StringArrayAction stringAction) {
		return will(new StringArrayActionStub(stringAction));
	}

	public OccurencesMatcher andPerform(Action action) {
		return will(new ActionStub(action));
	}
	
	///////////////////////////////////////////////////////////////////////////////////////////////
	// <Type>ConsequenceCapturer methods
	///////////////////////////////////////////////////////////////////////////////////////////////
	
	public void andReturning(boolean ... result) {
		andReturn(result);
	}
	
	public void andReturning(byte ... result) {
		andReturn(result);
	}
	
	public void andReturning(char ... result) {
		andReturn(result);
	}
	
	public void andReturning(double ... result) {
		andReturn(result);
	}
	
	public void andReturning(float ... result) {
		andReturn(result);
	}
	
	public void andReturning(int ... result) {
		andReturn(result);
	}
	
	public void andReturning(long ... result) {
		andReturn(result);
	}
	
	public void andReturning(short ... result) {
		andReturn(result);
	}
	
	public void andReturning(String ... result) {
		andReturn(result);
	}
	
	public void andReturning(Object ... result) {
		andReturn(result);
	}
	
	public void andPerforming(BooleanArrayAction action) {
		andPerform(action);
	}
	
	public void andPerforming(ByteArrayAction action) {
		andPerform(action);
	}
	
	public void andPerforming(CharArrayAction action) {
		andPerform(action);
	}
	
	public void andPerforming(DoubleArrayAction action) {
		andPerform(action);
	}
	
	public void andPerforming(FloatArrayAction action) {
		andPerform(action);
	}
	
	public void andPerforming(IntArrayAction action) {
		andPerform(action);
	}
	
	public void andPerforming(LongArrayAction action) {
		andPerform(action);
	}
	
	public void andPerforming(ShortArrayAction action) {
		andPerform(action);
	}
	
	public void andPerforming(StringArrayAction action) {
		andPerform(action);
	}
	
	public void andPerforming(Action action) {
		andPerform(action);
	}
	
	public void andRaising(Throwable throwable) {
		andRaise(throwable);
	}
}
